package com.qys.livesMall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.qys.livesMall.product.entity.H2ProductSku;
import com.qys.livesMall.product.model.dto.AddAttrOptions;
import com.qys.livesMall.product.model.dto.DelAttrOptions;
import com.qys.livesMall.product.model.dto.EditProductSku;
import com.qys.livesMall.product.model.vo.AddAttrOptionsVO;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author gmx
 * @since 2023-05-17
 */
public interface H2ProductSkuService extends IService<H2ProductSku> {
   boolean decount(Long id,int num);

   /**
    * 总库存
    * @param spuId
    * @return
    */
   Integer getBySpuId(Long spuId);

   List<H2ProductSku> listBySpuId(Long spuId);

   AddAttrOptionsVO add(AddAttrOptions attrOptions);

   void upd(EditProductSku editSku);

   List<H2ProductSku> del(DelAttrOptions attrOptions);
}
